import 'package:boss/ui/widget/button/outline_radius_button.dart';
import 'package:boss/ui/widget/button/radius_button.dart';
import 'package:boss/ui/widget/shadow_radius_card.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';

class FixedBottomDoubleBtn extends StatelessWidget {
  final String first;
  final VoidCallback onFirst;
  final String second;
  final VoidCallback onSecond;
  final bool isShowShadow;

  const FixedBottomDoubleBtn({
    Key key,
    this.first = '保存',
    this.onFirst,
    this.second = '删除',
    this.onSecond,
    this.isShowShadow = true,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 120.w + MediaQuery.of(context).padding.bottom,
      padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
      alignment: Alignment.center,
      decoration: BoxDecoration(
        color: Colors.white,
        boxShadow: isShowShadow ? [DEFAULT_SHADOW] : null,
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          OutlineRadiusButton(
            title: first,
            onTap: onFirst,
            width: 275.w,
          ),
          RadiusButton(
            title: second,
            onTap: onSecond,
            width: 275.w,
            margin: EdgeInsets.only(left: 40.w),
          ),
        ],
      ),
    );
  }
}
